import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home/index.vue')
  },
  {
    path: '/topic',
    name: 'Topic',
    component: () => import('../views/topic/index.vue')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import('../views/cart/index.vue')
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('../views/category/index.vue'),
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/mine/index.vue')
  },
  {
    path: '/pages/search/main',
    name: 'Search',
    component: () => import('../views/pages/search/main.vue')
  },
  {
    path: '/pages/mappage/main',
    name: 'Mappage',
    component: () => import('../views/pages/mappage/main.vue')
  },
  {
    path: '/categorylist/main',
    name: 'Categorylist',
    component: () => import('../views/pages/categorylist/main.vue')
  },
  {
    path: '/branddetail/main',
    name: 'Branddetail',
    component: () => import('../views/pages/branddetail/main.vue')
  },
  {
    path: '/newgoods/main',
    name: 'Newgoods',
    component: () => import('../views/pages/newgoods/main.vue')
  },
  {
    path: '/goods/main',
    name: 'Goods',
    component: () => import('../views/pages/goods/main.vue')
  },
  {
    path: '/pages/topicdetail/main',
    name: 'Topicdetail',
    component: () => import('../views/pages/topicdetail/main.vue')
  },
  {
    path: '/pages/catedetail/main',
    name: 'Catedetail',
    component: () => import('../views/pages/catedetail/main.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
